<HTML><HEAD><TITLE>Engine.js</TITLE></HEAD><BODY>
<A NAME="_top_"></A><PRE><A HREF="index.html">Index Files</A> </PRE><HR/>
<H1>File Engine.js</H1>
 Provides global engine features. <P><DL><DT><B>Author:</B></DT><DD>Carlos Eduardo Goncalves</DD></DL></P>
<HR/>
<A HREF=#Engine>Engine</A><BR/>
<A HREF=#Engine.debug >Engine.debug </A><BR/>
<A HREF=#Engine.progressBar >Engine.progressBar </A><BR/>
<A HREF=#Engine.ACTIVEX_XHR >Engine.ACTIVEX_XHR </A><BR/>
<A HREF=#Engine.ACTIVEX_DOM >Engine.ACTIVEX_DOM </A><BR/>
<A HREF=#Engine.HTTP_METHODS >Engine.HTTP_METHODS </A><BR/>
<A HREF=#Engine.HTTP_STATUS_CODES >Engine.HTTP_STATUS_CODES </A><BR/>
<A HREF=#Engine.reportException>Engine.reportException</A><BR/>
<A HREF=#Engine.doTimer>Engine.doTimer</A><BR/>
<A HREF=#Engine.setProgressBar>Engine.setProgressBar</A><BR/>
<A HREF=#Engine.buildActiveX>Engine.buildActiveX</A><BR/>
<A HREF=#Engine.buildRequest>Engine.buildRequest</A><BR/>
<A HREF=#Engine.loadFile>Engine.loadFile</A><BR/>
<A HREF=#Engine.assertType>Engine.assertType</A><BR/>
<A HREF=#Engine.assertOneOfTypes>Engine.assertOneOfTypes</A><BR/>
<A HREF=#Engine.doAsPrivileged>Engine.doAsPrivileged</A><BR/>
<HR/>
<A NAME=Engine></A>
<H2>Constructor Engine</H2><PRE>function Engine(debug, progressBar)</PRE>  <p>Engine constructor.</p> <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>debug</I></TD><TD><code>Boolean</code> flag that turns on/off the engine debug mode. </TD></TR><TR><TD><I>progressBar</I></TD><TD>Progress bar object used by the engine.</TD></TR></TABLE></P><BR/><BR/>
<A NAME=Engine.debug ></A>
<H2> Attribute Engine.debug </H2><PRE>Engine.debug </PRE> <p>Debug mode flag.</p> <P></P><BR/><BR/>
<A NAME=Engine.progressBar ></A>
<H2> Attribute Engine.progressBar </H2><PRE>Engine.progressBar </PRE> <p>Engine global progress bar.</p> <P></P><BR/><BR/>
<A NAME=Engine.ACTIVEX_XHR ></A>
<H2> Attribute Engine.ACTIVEX_XHR </H2><PRE>Engine.ACTIVEX_XHR </PRE> <p>ActiveX classes that provide XMLHttpRequest features.</p> <P></P><BR/><BR/>
<A NAME=Engine.ACTIVEX_DOM ></A>
<H2> Attribute Engine.ACTIVEX_DOM </H2><PRE>Engine.ACTIVEX_DOM </PRE> <p>ActiveX classes that provide DOM features.</p> <P></P><BR/><BR/>
<A NAME=Engine.HTTP_METHODS ></A>
<H2> Attribute Engine.HTTP_METHODS </H2><PRE>Engine.HTTP_METHODS </PRE> <p>HTTP supported methods.</p> <P></P><BR/><BR/>
<A NAME=Engine.HTTP_STATUS_CODES ></A>
<H2> Attribute Engine.HTTP_STATUS_CODES </H2><PRE>Engine.HTTP_STATUS_CODES </PRE> <p>HTTP status codes.</p> <P></P><BR/><BR/>
<A NAME=Engine.reportException></A>
<H2> Method Engine.reportException</H2><PRE>Engine.reportException = function(msg_id, exception)</PRE>  <p>Define the way how exceptions are reported.</p> <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>msg_id</I></TD><TD><code>Message</code> unique identifier on message queue. </TD></TR><TR><TD><I>exception</I></TD><TD>Exception to be displayed or threw. </TD></TR></TABLE><DL><DT><B>Throws:</B></DT><DD>Run time exception.</DD></DL></P><BR/><BR/>
<A NAME=Engine.doTimer></A>
<H2> Method Engine.doTimer</H2><PRE>Engine.doTimer = function()</PRE> <p>Hook function called automatically by the engine to perform  continuous tasks like garbage collection and progress feedback.</p><P></P><BR/><BR/>
<A NAME=Engine.setProgressBar></A>
<H2> Method Engine.setProgressBar</H2><PRE>Engine.setProgressBar = function(progressBar)</PRE> <p>Set or replace the engine progress bar for a new one.</p> <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>progressBar</I></TD><TD>New engine progressBar instance. </TD></TR></TABLE><DL><DT><B>See:</B></DT><DD>EmbeddedProgressBar </DD><DD>FlyProgressBar</DD></DL></P><BR/><BR/>
<A NAME=Engine.buildActiveX></A>
<H2> Method Engine.buildActiveX</H2><PRE>Engine.buildActiveX = function(names)</PRE>  <p>Try to build an ActiveX object based on a list classes.</p>  <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>names</I></TD><TD>Array with ActiveX class names that could be created. </TD></TR></TABLE><DL><DT><B>Returns:</B></DT><DD>Reference to an <code>ActiveXObject</code>.</DD></DL></P><BR/><BR/>
<A NAME=Engine.buildRequest></A>
<H2> Method Engine.buildRequest</H2><PRE>Engine.buildRequest = function()</PRE>  <p>Build client side JavaScript objects required to XMLHTTP request.</p>	 <P><DL><DT><B>Returns:</B></DT><DD>Reference to a <code>XMLHttpRequest</code> or <code>ActiveXObject</code> instance.</DD></DL></P><BR/><BR/>
<A NAME=Engine.loadFile></A>
<H2> Method Engine.loadFile</H2><PRE>Engine.loadFile = function(url)</PRE>  <p>Load a file based on the provided url.</p> <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>url</I></TD><TD>Universal resource locator to the file. </TD></TR></TABLE><DL><DT><B>Returns:</B></DT><DD>Reference to a <code>XMLDocument</code> instance.</DD></DL></P><BR/><BR/>
<A NAME=Engine.assertType></A>
<H2> Method Engine.assertType</H2><PRE>Engine.assertType = function(obj, type)</PRE>  <p>Check if object type is correct.</p> <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>obj</I></TD><TD>Object to type check. </TD></TR><TR><TD><I>type</I></TD><TD>Type to be used on check. </TD></TR></TABLE><DL><DT><B>Returns:</B></DT><DD><code>Boolean</code> flag that indicates if obtect type match the specified type.</DD></DL></P><BR/><BR/>
<A NAME=Engine.assertOneOfTypes></A>
<H2> Method Engine.assertOneOfTypes</H2><PRE>Engine.assertOneOfTypes = function(obj, types)</PRE>  <p>Check if object type match any of the options.</p> <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>obj</I></TD><TD>Object to type check. </TD></TR><TR><TD><I>types</I></TD><TD>Array with types to be used on check. </TD></TR></TABLE><DL><DT><B>Returns:</B></DT><DD><code>Boolean</code> flag that indicates if obtect type match one of the specified types.</DD></DL></P><BR/><BR/>
<A NAME=Engine.doAsPrivileged></A>
<H2> Method Engine.doAsPrivileged</H2><PRE>Engine.doAsPrivileged = function()</PRE> <p>Enable browser security privileges.</p><P></P><BR/><BR/>
</BODY></HTML>
